function [xi,yi]=CrossPoint(xc,yc,x,y)
tic
global Node Elem ElemNum Crack
x=Node(:,2);
y=Node(:,3);
xc=Crack(:,2);
yc=Crack(:,3);
ElemNode=Elem(:,[2:end,2]);

xElem=[x(ElemNode),nan(ElemNum,1)]';
yElem=[y(ElemNode),nan(ElemNum,1)]';
xs=xElem(:);
ys=yElem(:);

[xi,yi,ii]=polyxpoly(xc,yc,x,y);
if ~isnan(xi)
    
end
toc
